<template>
  <div>我是Hello中的count{{ count }}</div>
</template>

<script>
import Pubsub from 'pubsub-js'
export default {
  name: "Hello",
  data() {
    return {
      count: 0,
    };
  },
  mounted(){
Pubsub.subscribe('count',(_,count)=>{
  this.count = count
})
  }
};
</script>

<style>
</style>